﻿
//新增
var fnCustomAdd = function () {



        //const_EditEntity = "ExaminationItem";
//        var pagetitle = "新增语言分类";
//        parent._employeeTitle = pagetitle;
//        parent.addTabs(pagetitle, encodeURI("../Extend/Edit.aspx?r=" + Math.random() + "&entity=" + const_EditEntity + "&flag=add"));
//        //parent.NeedRefreshPage = this;

    document.getElementById("EditUIWindow").src = "AutoLoadForm.aspx?r=" + Math.random() + "&entity=" + const_EditEntity + "";
    SetDWH(const_EditWindowWidth, const_EditWindowHeight, YAHOO.example.container.dialog1);
    YAHOO.example.container.dialog1.show();
            
}

//  修改
var fnCustomEdit = function () {
    var recordID = myDataTable.getSelectedRows()[0];
    record = myDataTable.getRecord(recordID);
    if (record == null) {
        alert("请选择一条记录");
        return;
    }
    //const_EditEntity = "ExaminationItem";
    //debugger
    var pagetitle = "修改语言分类_" + record._oData["Lan"];
    var CategoryName = record._oData["cateoryname"];
    parent._employeeTitle = pagetitle;
    parent.addTabs(pagetitle, encodeURI("../Extend/Edit.aspx?r=" + Math.random() + "&entity=" + const_EditEntity + "&flag=edit" + "&id=" + record.getData(const_entityID) ));
    //parent.NeedRefreshPage = this;
}

